home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / BallBreaker.swf / scripts / frame_12 / PlaceObject2_83_6 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Encoding:
Text File  |  2006-06-13  |  1.0 KB  |  41 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.vars.gameon == 1)
  3.    {
  4.       if(316 < _X)
  5.       {
  6.          _root.sounds.ballhit_sfx.start(0.1,1);
  7.          _root.ball._x = 315;
  8.          set("_root.vars.:ballx",eval("_root.vars.:ballx") * -1);
  9.       }
  10.       if(_X < 4)
  11.       {
  12.          _root.sounds.ballhit_sfx.start(0.1,1);
  13.          _root.ball._x = 5;
  14.          set("_root.vars.:ballx",eval("_root.vars.:ballx") * -1);
  15.       }
  16.       if(_Y < 22)
  17.       {
  18.          _root.sounds.ballhit_sfx.start(0.1,1);
  19.          set("_root.vars.:bally",eval("_root.vars.:bally") * -1);
  20.       }
  21.       if(270 < _Y)
  22.       {
  23.          _root.func.miss();
  24.          if(4 < _root.vars.miss)
  25.          {
  26.             _root.gotoAndPlay("over");
  27.          }
  28.          else
  29.          {
  30.             _root.gotoAndPlay("miss");
  31.          }
  32.          _root.vars.gameon = 0;
  33.          set("_root.vars.:ballx",3);
  34.          set("_root.vars.:bally",-3);
  35.       }
  36.       _X = _X + eval("_root.vars.:ballx");
  37.       _Y = _Y + eval("_root.vars.:bally");
  38.       updateAfterEvent();
  39.    }
  40. }
  41.